// Playground - noun: a place where people can play

import UIKit


var url = NSURL(string: "http://www.weather.com.cn/data/sk/101010100.html")


var data = NSData.dataWithContentsOfURL(url, options:NSDataReadingOptions.DataReadingUncached, error:nil)

var str = NSString(data:data, encoding: NSUTF8StringEncoding)

var json : AnyObject! = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.AllowFragments, error: nil)

var weather : AnyObject! = json.objectForKey("weatherinfo")
var city : AnyObject! = weather.objectForKey("city")


println("********调用项目接口**轻微快撤*********")

var url2 = NSURL(string: "http://182.151.214.108:81/v4.0/index.php/?appid=56&appkey=a546171104ddsd54771ds0a950a134a5&fun=userinfo&act=get")

var data2 = NSData.dataWithContentsOfURL(url2, options:NSDataReadingOptions.DataReadingUncached, error:nil)

var str2 = NSString(data:data2, encoding: NSUTF8StringEncoding)

var json2 : AnyObject! = NSJSONSerialization.JSONObjectWithData(data2, options: NSJSONReadingOptions.AllowFragments, error: nil)


